<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 240px;
            background-color: yellow;
            border: 1px solid orange;
            padding: 10px;
            display: none;
        }
    </style>
</head>
<body>
    <p><input type="checkbox">两周内自动登录</p>
    <div id="div">为了您的信息安全，请不要在网吧或公用电脑上使用此功能!</div>
</body>
<script>
    let div =document.getElementById('div')
    let p =document.getElementsByTagName('p')[0]
    p.onmouseenter = function(){
        div.style.display = 'block'
    }
    p.onmouseleave = function(){
        div.style.display = 'none'
    }
</script>
</html>